import {Options as BaseVectorOptions} from 'ol/layer/BaseVector';
import VectorSource from 'ol/source/Vector';
import {DcVectorLayerQueryOptions} from './dc-vector-layer-query-options';
import Projection from 'ol/proj/Projection';
import Feature from 'ol/Feature';
import Style from 'ol/style/Style';
import Layer from 'ol/layer/Layer';
import MapBrowserEvent from 'ol/MapBrowserEvent';
import {Extent} from 'ol/extent';

export interface DcVectorLayerOptions extends BaseVectorOptions {
    /**
     * 图层ID
     */
    layerId: string;

    /**
     * 图层配置
     */
    layerConfig?: any;

    sourceChangeCallback?: (source: VectorSource) => void;

    beforeLoadParamCallback?: (param: DcVectorLayerQueryOptions, extent: Extent, resolution: number, projection: Projection) => DcVectorLayerQueryOptions;

    featureClickCallback?: (feature: Feature, layer: Layer, mapEvent: MapBrowserEvent) => void;

    featurePointermoveCallback?: (feature: Feature, layer: Layer, mapEvent: MapBrowserEvent) => void;

    styleCallback?: (feature: Feature, resolution: number, styles: Style[]) => Style[];

}
